import server from "@/utils/request";

export const login = (params) => {
  return server({
    method: "post",
    url: "/login",
    data: params,
  });
};

export const userList = (params) => {
  return server({
    method: "get",
    url: "/users/list",
    params: params,
  });
};

export const getUser = (params) => {
  return server({
    method: "get",
    url: `/users/${params.id}`,
  });
};

export const userDel = (params) => {
  return server({
    method: "post",
    url: `/users/${params.id}/del`,
    data: {
      is_del: params.is_del,
    },
  });
};
